package cn.iocoder.yudao.module.ym.controller.admin.area;

import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportExcelVO;
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportRespVO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.enums.common.SexEnum;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;

import jakarta.validation.constraints.*;
import jakarta.validation.*;
import jakarta.servlet.http.*;

import java.lang.annotation.Retention;
import java.util.*;
import java.io.IOException;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;

import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;

import cn.iocoder.yudao.module.ym.controller.admin.area.vo.*;
import cn.iocoder.yudao.module.ym.dal.dataobject.area.AreaDO;
import cn.iocoder.yudao.module.ym.service.area.AreaService;
import org.springframework.web.multipart.MultipartFile;

@Tag(name = "管理后台 - 区域")
@RestController
@RequestMapping("/ym/area")
@Validated
public class YmAreaController {

    @Resource
    private AreaService areaService;


    @PostMapping("/create")
    @Operation(summary = "创建区域")
    public CommonResult<Long> createArea(@Valid @RequestBody AreaSaveReqVO createReqVO) {
        return success(areaService.createArea(createReqVO));
    }

    @PutMapping("/update")
    @Operation(summary = "更新区域")
    public CommonResult<Boolean> updateArea(@Valid @RequestBody AreaSaveReqVO updateReqVO) {
        areaService.updateArea(updateReqVO);
        return success(true);
    }

    @DeleteMapping("/delete")
    @Operation(summary = "删除区域")
    @Parameter(name = "id", description = "编号", required = true)
    public CommonResult<Boolean> deleteArea(@RequestParam("id") Long id) {
        areaService.deleteArea(id);
        return success(true);
    }

    @GetMapping("/get")
    @Operation(summary = "获得区域")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    public CommonResult<AreaRespVO> getArea(@RequestParam("id") Long id) {
        return success(areaService.getArea(id));
    }


    @GetMapping("/listAll")
    @Operation(summary = "获得所有区域不分页")
    public CommonResult<List<AreaRespVO>> getAreaListAll(@Valid AreaPageReqVO pageReqVO) {
        return success(areaService.getAreaListAll(pageReqVO));
    }

    @GetMapping("/list")
    @Operation(summary = "获得区域不分页")
    public CommonResult<List<AreaRespVO>> getAreaList(@Valid AreaPageReqVO pageReqVO) {
        return success(areaService.getAreaList(pageReqVO));
    }


    @GetMapping("/page")
    @Operation(summary = "获得区域分页")
    public CommonResult<PageResult<AreaRespVO>> getAreaPage(@Valid AreaPageReqVO pageReqVO) {
        long l = System.currentTimeMillis();
        PageResult<AreaRespVO> pageResult = areaService.getAreaPage(pageReqVO);
        long l1 = System.currentTimeMillis();

        PageResult<AreaRespVO> bean = BeanUtils.toBean(pageResult, AreaRespVO.class);
        System.out.println(l1 -l +"----------------------------");
        return success(bean);
    }

    @GetMapping("/export-excel")
    @Operation(summary = "导出区域 Excel")
    @ApiAccessLog(operateType = EXPORT)
    public void exportAreaExcel(@Valid AreaPageReqVO pageReqVO,
              HttpServletResponse response) throws IOException {
        pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
        List<AreaRespVO> list = areaService.getAreaPage(pageReqVO).getList();
        // 导出 Excel
        ExcelUtils.write(response, "区域.xls", "数据", AreaRespVO.class,
                list);
    }

    @PostMapping("/excel-import")
    public CommonResult<UserImportRespVO> uploadExcel(@RequestParam("file") MultipartFile file, Boolean updateSupport) {
        // 2. 解析Excel数据
        List<Map<String, String>> dataList = ExcelUtils.excelToMap(file);
        UserImportRespVO userImportRespVO = areaService.importArea(dataList, updateSupport);
        return success(userImportRespVO);
    }

    @GetMapping("/get-import-template")
    @Operation(summary = "获得区域导入模板")
    public void importTemplate(HttpServletResponse response) throws IOException {
        // 手动创建导出 demo
        List<AreaRespVO> list = Arrays.asList(
                AreaRespVO.builder().areaName("南海区").areaDescription("区域描述").coordinates("[[113.300979,23.150313],[113.301002,23.150343],[113.301086,23.150456],[113.301109,23.150487],[113.301198,23.150614],[113.302596,23.152689],[113.302704,23.15285],[113.302799,23.15299],[113.302875,23.153103],[113.302917,23.153144],[113.303184,23.153462],[113.303316,23.153605],[113.303356,23.153648],[113.303388,23.153682],[113.303464,23.153809],[113.303788,23.154199],[113.304865,23.154676],[113.30497,23.154718],[113.305046,23.154748],[113.30543,23.154909],[113.305466,23.154925],[113.305584,23.154977],[113.305607,23.154989],[113.305635,23.155011],[113.305681,23.15506],[113.305922,23.155159],[113.306043,23.155173],[113.307362,23.155735],[113.307492,23.155787],[113.307544,23.155804],[113.30759,23.155817],[113.307745,23.155864],[113.307776,23.155874],[113.308577,23.156044],[113.308649,23.156054],[113.308655,23.156062],[113.308667,23.156076],[113.308684,23.156124],[113.308681,23.156166],[113.30868,23.156175],[113.308675,23.156228],[113.308669,23.156251],[113.308663,23.15627],[113.308657,23.156289],[113.308638,23.156323],[113.308622,23.156349],[113.308614,23.156363],[113.308579,23.156406],[113.308499,23.156539],[113.307163,23.158396],[113.307149,23.158417],[113.307107,23.158474],[113.307101,23.158481],[113.306981,23.158622],[113.306536,23.159169],[113.30624,23.159734],[113.30624,23.159769],[113.30627,23.159764],[113.307928,23.159429],[113.309701,23.159751],[113.309919,23.159587],[113.310032,23.159316],[113.310041,23.158161],[113.310128,23.157781],[113.310563,23.157326],[113.311676,23.156978],[113.312198,23.157199],[113.312424,23.157401],[113.312554,23.158074],[113.312467,23.158304],[113.312319,23.158423],[113.312041,23.159304],[113.310598,23.160695],[113.310589,23.160923],[113.310946,23.161266],[113.310954,23.161273],[113.311024,23.161323],[113.311076,23.161365],[113.311099,23.161384],[113.311172,23.161473],[113.311232,23.161526],[113.311323,23.161592],[113.311868,23.162469],[113.31185,23.162868],[113.31158,23.163552],[113.311064,23.163891],[113.310972,23.163939],[113.310824,23.163998],[113.310685,23.164082],[113.310563,23.16411],[113.31032,23.164177],[113.310137,23.164231],[113.309537,23.165027],[113.309398,23.167456],[113.309198,23.168639],[113.30912,23.169092],[113.309616,23.169668],[113.309711,23.169734],[113.309755,23.169781],[113.309876,23.169884],[113.309998,23.16999],[113.310068,23.170053],[113.310085,23.170073],[113.310137,23.170099],[113.310189,23.17011],[113.310216,23.170114],[113.310285,23.170093],[113.311999,23.170291],[113.313059,23.170213],[113.313547,23.170177],[113.314791,23.171036],[113.316295,23.172144],[113.316347,23.172201],[113.316347,23.172287],[113.316347,23.172379],[113.316304,23.172548],[113.316286,23.172706],[113.316304,23.172787],[113.316312,23.172863],[113.316356,23.172952],[113.316408,23.173036],[113.316487,23.173141],[113.316539,23.173221],[113.316556,23.173313],[113.316565,23.173358],[113.316591,23.17353],[113.316591,23.17371],[113.316582,23.173849],[113.316574,23.174092],[113.316565,23.174209],[113.316547,23.17437],[113.316521,23.174482],[113.316487,23.174587],[113.316443,23.174693],[113.316435,23.174726],[113.316443,23.174749],[113.316513,23.174789],[113.3166,23.174828],[113.316991,23.175035],[113.317183,23.175139],[113.317365,23.175229],[113.317548,23.17532],[113.317731,23.175594],[113.317919,23.175689],[113.31809,23.175773],[113.318289,23.175867],[113.318412,23.175915],[113.31849,23.175939],[113.318484,23.175946],[113.318431,23.176163],[113.318403,23.176549],[113.31785,23.177017],[113.317672,23.177356],[113.317839,23.177484],[113.319258,23.177017],[113.319317,23.176554],[113.320301,23.17636],[113.320219,23.175892],[113.320233,23.175889],[113.32025,23.175891],[113.320307,23.175891],[113.320534,23.175869],[113.321717,23.175757],[113.321699,23.174611],[113.322523,23.174771],[113.322947,23.174726],[113.323435,23.174504],[113.32377,23.174021],[113.323847,23.174136],[113.323961,23.174275],[113.324028,23.174364],[113.324123,23.174457],[113.324211,23.174538],[113.324341,23.174684],[113.324393,23.174762],[113.324498,23.174879],[113.324567,23.174962],[113.324672,23.175079],[113.324767,23.175166],[113.324854,23.175232],[113.324976,23.175295],[113.325072,23.175345],[113.325159,23.175376],[113.325324,23.175393],[113.325481,23.175385],[113.325594,23.175379],[113.325681,23.175359],[113.325759,23.175357],[113.32582,23.175358],[113.325976,23.175403],[113.326124,23.175432],[113.326272,23.175449],[113.326368,23.175452],[113.326481,23.175446],[113.326542,23.17543],[113.326664,23.175409],[113.326777,23.175379],[113.326951,23.175312],[113.327055,23.175249],[113.327229,23.175113],[113.327342,23.17505],[113.32742,23.174972],[113.327533,23.174898],[113.327673,23.174794],[113.327777,23.174714],[113.32789,23.174614],[113.327959,23.174532],[113.328021,23.174393],[113.328064,23.174311],[113.328099,23.174231],[113.328177,23.174101],[113.32836,23.173755],[113.328739,23.173461],[113.328878,23.173449],[113.329023,23.173497],[113.329296,23.173697],[113.329435,23.173739],[113.329526,23.173691],[113.330258,23.172886],[113.3307,23.173134],[113.330942,23.173443],[113.331221,23.173273],[113.331433,23.173231],[113.332039,23.173189],[113.332686,23.17317],[113.332904,23.173213],[113.333073,23.173316],[113.333422,23.173553],[113.333664,23.173835],[113.334186,23.174587],[113.333936,23.175047],[113.334001,23.175705],[113.334207,23.176195],[113.33453,23.176595],[113.334711,23.177189],[113.334465,23.177847],[113.334517,23.178338],[113.334982,23.178621],[113.335859,23.178608],[113.33749,23.177988],[113.337863,23.178882],[113.338164,23.179208],[113.338619,23.179581],[113.33869,23.17978],[113.338516,23.179826],[113.338603,23.180138],[113.338424,23.180725],[113.337781,23.180684],[113.33742,23.181099],[113.337524,23.181486],[113.337266,23.181912],[113.337369,23.182299],[113.338079,23.182609],[113.338453,23.182738],[113.338679,23.182975],[113.338755,23.184237],[113.338773,23.184298],[113.33879,23.184359],[113.338798,23.184389],[113.338824,23.184424],[113.338851,23.184452],[113.338912,23.184515],[113.338938,23.184552],[113.338972,23.184607],[113.339018,23.184773],[113.339063,23.18479],[113.339129,23.184796],[113.339294,23.184822],[113.339442,23.184857],[113.339573,23.184899],[113.33974,23.185034],[113.339842,23.185091],[113.339886,23.185134],[113.339921,23.185199],[113.339947,23.185223],[113.339981,23.185243],[113.340016,23.185251],[113.340051,23.185249],[113.340182,23.185226],[113.340225,23.185226],[113.340251,23.185239],[113.341399,23.18591],[113.342626,23.186624],[113.342774,23.187108],[113.343104,23.188147],[113.343183,23.188399],[113.344079,23.190573],[113.344296,23.191106],[113.344861,23.192468],[113.344983,23.192668],[113.345062,23.19277],[113.345149,23.192896],[113.345244,23.193035],[113.345331,23.193187],[113.345375,23.193274],[113.347262,23.194461],[113.347558,23.194653],[113.347602,23.194692],[113.347645,23.194759],[113.347723,23.194944],[113.347819,23.19525],[113.347871,23.195396],[113.347941,23.195558],[113.348019,23.195743],[113.348036,23.195867],[113.348062,23.195958],[113.348097,23.196093],[113.348132,23.196173],[113.348202,23.196299],[113.348237,23.19636],[113.34828,23.196414],[113.348332,23.196462],[113.348411,23.196495],[113.348497,23.196517],[113.348654,23.196565],[113.348732,23.196596],[113.348785,23.196634],[113.348828,23.196693],[113.348828,23.196722],[113.350202,23.202994],[113.350289,23.203402],[113.350307,23.203511],[113.350333,23.203621],[113.350368,23.203758],[113.350403,23.203923],[113.350429,23.204021],[113.350446,23.20411],[113.350437,23.204221],[113.350429,23.204283],[113.350411,23.20439],[113.350377,23.204518],[113.350359,23.204603],[113.350359,23.204679],[113.350359,23.204729],[113.350368,23.204822],[113.350377,23.204943],[113.350377,23.205035],[113.350368,23.205152],[113.350351,23.205273],[113.350307,23.205564],[113.350264,23.205814],[113.350273,23.206146],[113.350273,23.206361],[113.350255,23.206556],[113.350229,23.206658],[113.350203,23.206791],[113.350203,23.206953],[113.350203,23.207134],[113.350194,23.207355],[113.350177,23.20744],[113.350351,23.208964],[113.350647,23.21155],[113.350647,23.211713],[113.350664,23.211906],[113.350682,23.212236],[113.350699,23.212414],[113.350699,23.212566],[113.350716,23.212683],[113.350734,23.212824],[113.350742,23.212963],[113.35076,23.21317],[113.350769,23.213194],[113.350551,23.214635],[113.350404,23.215705],[113.350421,23.21577],[113.350438,23.215846],[113.350456,23.215889],[113.350464,23.215926],[113.350473,23.216004],[113.350473,23.216056],[113.350473,23.216089],[113.350438,23.216165],[113.350404,23.216243],[113.35036,23.216332],[113.350273,23.216453],[113.350212,23.216501],[113.350151,23.216542],[113.350091,23.216586],[113.350064,23.216629],[113.35003,23.216687],[113.350012,23.216752],[113.350012,23.216887],[113.350038,23.216983],[113.350082,23.217137],[113.350116,23.217256],[113.350125,23.217302],[113.350134,23.217376],[113.350125,23.217432],[113.350116,23.217495],[113.350056,23.21764],[113.350012,23.217786],[113.349995,23.21789],[113.349986,23.217996],[113.349995,23.218096],[113.350047,23.218266],[113.350108,23.218385],[113.350143,23.218461],[113.350247,23.218639],[113.350334,23.218842],[113.35043,23.219028],[113.350473,23.219174],[113.350491,23.219259],[113.350499,23.219341],[113.350508,23.219393],[113.350508,23.219441],[113.350499,23.219517],[113.350473,23.219591],[113.350421,23.219699],[113.350404,23.219751],[113.350404,23.219818],[113.35043,23.219897],[113.350482,23.219988],[113.350526,23.220051],[113.350647,23.220168],[113.350856,23.220392],[113.350952,23.22054],[113.353248,23.224667],[113.353326,23.224767],[113.353404,23.224878],[113.353439,23.224965],[113.353466,23.225045],[113.353492,23.225153],[113.353509,23.225264],[113.353544,23.225356],[113.353579,23.225468],[113.353605,23.225542],[113.353666,23.225683],[113.353718,23.225775],[113.353787,23.225888],[113.353839,23.225951],[113.353909,23.226027],[113.353979,23.226105],[113.354031,23.226168],[113.354187,23.226344],[113.355396,23.227184],[113.359475,23.230003],[113.359675,23.230146],[113.359884,23.230105],[113.360023,23.230042],[113.360179,23.229962],[113.360318,23.229904],[113.360449,23.229856],[113.360597,23.229831],[113.360692,23.229794],[113.360762,23.229753],[113.360822,23.229707],[113.360875,23.229657],[113.360971,23.229534],[113.361058,23.229436],[113.361144,23.229361],[113.361257,23.229276],[113.361362,23.22922],[113.361475,23.229174],[113.361553,23.229146],[113.36164,23.229127],[113.361771,23.229109],[113.361988,23.229075],[113.362162,23.229045],[113.362327,23.229013],[113.362484,23.228972],[113.362605,23.228933],[113.362709,23.228901],[113.362858,23.228849],[113.363083,23.228775],[113.363196,23.22873],[113.363414,23.228669],[113.363544,23.228637],[113.363736,23.228587],[113.363831,23.228579],[113.363918,23.228575],[113.36397,23.228584],[113.364023,23.228614],[113.364083,23.228668],[113.364162,23.228749],[113.364231,23.228792],[113.364336,23.228831],[113.364466,23.228849],[113.364622,23.228858],[113.364692,23.228843],[113.36477,23.228817],[113.364823,23.228806],[113.364918,23.228804],[113.365031,23.228811],[113.365196,23.228816],[113.365387,23.228818],[113.365518,23.228809],[113.365596,23.228805],[113.36564,23.228809],[113.365692,23.228821],[113.365727,23.228849],[113.365761,23.228905],[113.365814,23.22899],[113.365866,23.229108],[113.365935,23.229194],[113.365996,23.229257],[113.366074,23.22932],[113.366144,23.229366],[113.366248,23.229414],[113.366301,23.229449],[113.366379,23.229497],[113.366431,23.229575],[113.366457,23.229638],[113.366483,23.229697],[113.366501,23.229727],[113.366552,23.229762],[113.366657,23.229792],[113.36677,23.229812],[113.36697,23.229834],[113.367153,23.229854],[113.367352,23.229869],[113.367457,23.229891],[113.367553,23.229922],[113.367665,23.229948],[113.367804,23.23],[113.367952,23.230059],[113.36817,23.230162],[113.368335,23.230253],[113.368439,23.230305],[113.368491,23.230318],[113.368517,23.230316],[113.373333,23.228606],[113.373377,23.22861],[113.373533,23.228632],[113.37369,23.228662],[113.373864,23.228691],[113.373985,23.2287],[113.374046,23.228689],[113.374167,23.228661],[113.374255,23.228652],[113.374394,23.228642],[113.374524,23.228644],[113.374629,23.228651],[113.374698,23.228659],[113.374811,23.228686],[113.374889,23.228716],[113.374993,23.228729],[113.375185,23.228742],[113.375289,23.228734],[113.375384,23.228715],[113.375532,23.228695],[113.375654,23.228684],[113.375828,23.228678],[113.376071,23.228674],[113.376227,23.228679],[113.376341,23.228685],[113.376515,23.228703],[113.376714,23.228736],[113.376862,23.228758],[113.377027,23.228801],[113.377201,23.228854],[113.37741,23.228914],[113.377557,23.228947],[113.379739,23.231208],[113.379921,23.231414],[113.381069,23.23272],[113.383076,23.235003],[113.383893,23.235317],[113.384189,23.235545],[113.384397,23.235923],[113.384849,23.236394],[113.385483,23.237797],[113.386604,23.239001],[113.390887,23.240893],[113.393536,23.243035],[113.394058,23.243137],[113.398053,23.245567],[113.39886,23.245476],[113.400006,23.245569],[113.400353,23.245646],[113.400519,23.245828],[113.400709,23.245878],[113.401751,23.245692],[113.402385,23.24519],[113.404998,23.241527],[113.404963,23.240578],[113.405145,23.240026],[113.405058,23.239518],[113.405223,23.239069],[113.405067,23.238585],[113.405093,23.238194],[113.404685,23.237667],[113.404746,23.23748],[113.405015,23.237206],[113.405648,23.231599],[113.40241,23.227804],[113.402453,23.227511],[113.402192,23.227081],[113.402158,23.226336],[113.401898,23.226056],[113.401681,23.225368],[113.401628,23.224189],[113.401889,23.22361],[113.401837,23.223258],[113.401958,23.222776],[113.401819,23.222262],[113.401958,23.221589],[113.401038,23.218034],[113.400638,23.217019],[113.399891,23.216593],[113.399648,23.215874],[113.399631,23.215511],[113.399153,23.215034],[113.398493,23.214827],[113.398067,23.21441],[113.398067,23.214211],[113.398944,23.213419],[113.399839,23.212905],[113.403598,23.210329],[113.407461,23.207509],[113.407548,23.206536],[113.407417,23.206174],[113.407443,23.205868],[113.407652,23.205423],[113.40799,23.205064],[113.40812,23.204331],[113.408945,23.203387],[113.417465,23.1968],[113.421611,23.194601],[113.421933,23.194075],[113.423623,23.192639],[113.423936,23.192012],[113.423925,23.191591],[113.423918,23.191569],[113.423898,23.191505],[113.423897,23.191491],[113.423886,23.191476],[113.423849,23.191412],[113.423814,23.191363],[113.423771,23.191334],[113.423761,23.191331],[113.423056,23.191333],[113.423043,23.191333],[113.422999,23.191333],[113.422941,23.191308],[113.422871,23.191278],[113.422851,23.19127],[113.422763,23.191233],[113.422673,23.191194],[113.420536,23.190271],[113.420492,23.189837],[113.420865,23.189094],[113.420874,23.188664],[113.420579,23.188241],[113.419425,23.187171],[113.419087,23.186483],[113.419096,23.186007],[113.419295,23.185669],[113.421108,23.184517],[113.421883,23.183878],[113.421885,23.183591],[113.422117,23.183426],[113.422393,23.183426],[113.4232,23.183725],[113.423776,23.183733],[113.42524,23.184069],[113.425231,23.183754],[113.425209,23.182905],[113.425043,23.181522],[113.424633,23.180024],[113.424019,23.178783],[113.424279,23.178571],[113.424459,23.178501],[113.424513,23.178474],[113.424559,23.178451],[113.424583,23.178448],[113.424663,23.178434],[113.424701,23.178431],[113.424775,23.178424],[113.425307,23.178349],[113.425366,23.178327],[113.425453,23.178286],[113.425484,23.178271],[113.426187,23.17776],[113.426224,23.177719],[113.426259,23.17771],[113.42632,23.177743],[113.426351,23.177778],[113.427501,23.179099],[113.428105,23.178487],[113.429242,23.178724],[113.429349,23.177895],[113.429263,23.17756],[113.429457,23.176968],[113.429929,23.176514],[113.42995,23.175923],[113.428538,23.173984],[113.427395,23.173064],[113.426633,23.17277],[113.42598,23.172747],[113.425223,23.172843],[113.423796,23.173346],[113.422758,23.172124],[113.42126,23.169897],[113.422571,23.168915],[113.422483,23.168663],[113.422397,23.168332],[113.421991,23.167163],[113.421303,23.166098],[113.416726,23.166645],[113.415536,23.166741],[113.415209,23.166315],[113.419438,23.16589],[113.419417,23.161738],[113.415705,23.158443],[113.415705,23.157908],[113.415706,23.157417],[113.425404,23.159244],[113.425747,23.158076],[113.425833,23.157891],[113.428799,23.156004],[113.431154,23.154535],[113.43279,23.153227],[113.433755,23.152033],[113.434857,23.151801],[113.435813,23.152202],[113.437991,23.154279],[113.438044,23.152729],[113.437344,23.143737],[113.437335,23.143536],[113.437345,23.143349],[113.437539,23.143331],[113.443511,23.142618],[113.445977,23.142152],[113.448038,23.141661],[113.447075,23.139734],[113.447033,23.139251],[113.447527,23.138373],[113.447752,23.137129],[113.447633,23.135965],[113.447055,23.135571],[113.446474,23.135403],[113.445056,23.134923],[113.444779,23.134116],[113.44374,23.131757],[113.443653,23.131565],[113.443479,23.131534],[113.443089,23.131331],[113.442769,23.131045],[113.442457,23.130613],[113.441122,23.128207],[113.440988,23.128046],[113.440956,23.128028],[113.440533,23.12757],[113.440567,23.12655],[113.440098,23.125687],[113.440054,23.12564],[113.440028,23.125558],[113.439675,23.124907],[113.439683,23.124473],[113.439699,23.124329],[113.439705,23.1243],[113.439718,23.124169],[113.439675,23.123904],[113.439597,23.123709],[113.43951,23.123581],[113.439276,23.123528],[113.439094,23.123528],[113.43873,23.123524],[113.438349,23.123535],[113.438011,23.123562],[113.437551,23.123751],[113.437231,23.123977],[113.437071,23.124106],[113.434636,23.123976],[113.433775,23.123997],[113.43363,23.124011],[113.433485,23.12404],[113.432942,23.124188],[113.432876,23.124191],[113.43281,23.124176],[113.432142,23.123658],[113.431319,23.122731],[113.430443,23.121343],[113.429568,23.119603],[113.429117,23.118523],[113.429065,23.118404],[113.428816,23.117801],[113.428631,23.117224],[113.428301,23.116196],[113.426869,23.112735],[113.426852,23.112675],[113.426753,23.112457],[113.425999,23.110634],[113.426523,23.109687],[113.426138,23.108444],[113.424988,23.108193],[113.424376,23.108059],[113.423991,23.107555],[113.424059,23.107399],[113.42456,23.106243],[113.424441,23.105817],[113.424038,23.105473],[113.421515,23.105462],[113.421041,23.105343],[113.42084,23.104952],[113.420923,23.10449],[113.422356,23.10346],[113.422061,23.102626],[113.421772,23.101909],[113.421746,23.101739],[113.417166,23.103408],[113.417112,23.103155],[113.416921,23.10268],[113.415793,23.100218],[113.41575,23.100142],[113.415671,23.099877],[113.415455,23.099502],[113.415064,23.09877],[113.414665,23.098121],[113.4084,23.099479],[113.407176,23.099744],[113.403704,23.101535],[113.403027,23.101882],[113.40261,23.102095],[113.402488,23.102158],[113.402228,23.102266],[113.401881,23.102385],[113.401785,23.102448],[113.401603,23.102568],[113.400986,23.10283],[113.400717,23.102969],[113.400379,23.103249],[113.399997,23.103592],[113.39971,23.103781],[113.399076,23.104152],[113.398468,23.104414],[113.398008,23.10456],[113.397487,23.104689],[113.396384,23.105],[113.394691,23.105422],[113.393101,23.105788],[113.392259,23.106048],[113.391694,23.106167],[113.390574,23.106364],[113.389088,23.106719],[113.387664,23.107015],[113.385561,23.107389],[113.384432,23.107544],[113.382329,23.107702],[113.381816,23.107778],[113.381642,23.107806],[113.381451,23.107825],[113.381095,23.107884],[113.380487,23.107826],[113.379914,23.107802],[113.374245,23.10742],[113.374099,23.107414],[113.374051,23.107411],[113.373906,23.107405],[113.372117,23.107193],[113.370882,23.107148],[113.361919,23.106976],[113.355727,23.107135],[113.351666,23.107474],[113.351509,23.107489],[113.351472,23.107492],[113.351316,23.107508],[113.347761,23.107851],[113.344908,23.108377],[113.343699,23.108816],[113.342377,23.109139],[113.340576,23.109394],[113.338619,23.109616],[113.334108,23.10969],[113.33402,23.109687],[113.333914,23.109684],[113.333826,23.109681],[113.330417,23.109359],[113.327511,23.1092],[113.323058,23.109209],[113.32298,23.10943],[113.322501,23.110002],[113.321727,23.110546],[113.320127,23.111261],[113.319292,23.112139],[113.319031,23.11231],[113.318883,23.112214],[113.317752,23.112288],[113.316778,23.112488],[113.315326,23.11262],[113.315212,23.112718],[113.315239,23.113146],[113.315239,23.113252],[113.315243,23.11334],[113.31525,23.113751],[113.315255,23.113945],[113.315256,23.114815],[113.315263,23.115009],[113.315287,23.115937],[113.315351,23.116504],[113.315358,23.116859],[113.315343,23.116962],[113.315311,23.117156],[113.315344,23.119197],[113.315344,23.119344],[113.315344,23.119392],[113.315347,23.119636],[113.315352,23.119769],[113.315352,23.119818],[113.315352,23.119831],[113.315347,23.120012],[113.315339,23.120291],[113.315334,23.120485],[113.315281,23.122394],[113.315275,23.122588],[113.315202,23.125234],[113.315207,23.125519],[113.315192,23.125616],[113.31516,23.126585],[113.315157,23.126648],[113.315151,23.126779],[113.315149,23.126842],[113.315146,23.129078],[113.315159,23.129211],[113.315161,23.129232],[113.315163,23.129271],[113.315165,23.129335],[113.315168,23.129405],[113.31517,23.129463],[113.315172,23.129484],[113.315175,23.129529],[113.315179,23.129586],[113.315185,23.129678],[113.315186,23.129693],[113.315181,23.129706],[113.315123,23.129764],[113.315112,23.129793],[113.315116,23.129827],[113.315131,23.129861],[113.315158,23.129905],[113.315196,23.129937],[113.315196,23.130017],[113.315214,23.131038],[113.315214,23.131232],[113.31524,23.133492],[113.31524,23.133525],[113.315229,23.133685],[113.315229,23.13369],[113.315223,23.133781],[113.315216,23.133873],[113.315216,23.133884],[113.315211,23.133938],[113.315206,23.134024],[113.315202,23.134066],[113.315202,23.134079],[113.315198,23.134131],[113.31519,23.134238],[113.315188,23.134272],[113.315214,23.134356],[113.315171,23.134431],[113.314826,23.138476],[113.314816,23.138669],[113.314793,23.139171],[113.314839,23.139236],[113.314784,23.139364],[113.314745,23.140121],[113.314729,23.140314],[113.314724,23.140368],[113.314721,23.140383],[113.314722,23.140403],[113.314712,23.140513],[113.314649,23.141266],[113.314647,23.141291],[113.314633,23.141459],[113.314631,23.141484],[113.314611,23.141721],[113.314606,23.141784],[113.314537,23.141898],[113.314379,23.142162],[113.314292,23.143132],[113.314206,23.143271],[113.312666,23.143667],[113.312093,23.143638],[113.311704,23.143485],[113.311692,23.143477],[113.311579,23.143401],[113.311545,23.143374],[113.311002,23.1425],[113.310905,23.142331],[113.309761,23.140314],[113.309144,23.140164],[113.309074,23.139962],[113.308848,23.139914],[113.308752,23.139697],[113.308474,23.13975],[113.308389,23.139884],[113.308396,23.139987],[113.308387,23.140033],[113.308361,23.140065],[113.308355,23.140068],[113.307857,23.140209],[113.306883,23.142841],[113.306058,23.144663],[113.30598,23.14484],[113.305937,23.144938],[113.305909,23.145002],[113.305881,23.145124],[113.305797,23.145307],[113.305705,23.145478],[113.305446,23.146074],[113.305439,23.146095],[113.305415,23.146169],[113.305385,23.146258],[113.305382,23.146268],[113.30535,23.14636],[113.305344,23.146374],[113.305321,23.146452],[113.305303,23.146628],[113.305219,23.146702],[113.304935,23.147393],[113.304184,23.148044],[113.303581,23.148466],[113.302942,23.148873],[113.302878,23.149001],[113.302257,23.149262],[113.301405,23.149321],[113.301046,23.150157]]").build());
        // 输出
        ExcelUtils.write(response, "区域导入模板.xls", "区域导入模板", AreaRespVO.class, list);
    }

    @GetMapping("/getAreaUser")
    @Operation(summary = "获得当前区域下的所有用户")
    public CommonResult<List<AdminUserDO>> getAreaUser(Long areaId) {
        return success(areaService.getAreaUser(areaId));
    }


}
